#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
	if (argc != 2) {
		cout << "Usage: " << argv[1] << " file_name" << endl;
		return 0;
	}

	char file_name[256];
	sprintf(file_name, "%s", argv[1]);

	NODE *head;
	head = createLinkList(file_name);
	if (head == NULL) {
		cout << "Link list creation error!" << endl;
		return 1;
	}

	// print link list
	printLinkList(head);

	removeDuplicate(head);

	// print link list
	printLinkList(head);

	// destroy link list
	destroyLinkList(head);

	return 0;
}
